package com.bosssoft.trainee.mbg.po;

import com.baomidou.mybatisplus.annotation.*;
import com.bosssoft.trainee.mbg.util.handler.ListOfIntegerHandler;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Author: wuxin
 * @Project: rbac-SpringCloud
 * @Date: 2022/7/19
 * @Description:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "r_department",autoResultMap = true)
public class Department implements Serializable {
    @TableId(value = "d_id",type = IdType.AUTO)
    private Integer  id;
    @TableField(value = "d_name")
    private String name;
    @TableField(value = "d_code")
    private String code;
    @TableField(value = "d_position_ids",typeHandler = ListOfIntegerHandler.class)
    private List<Integer> positionIds;
    @TableField(value = "d_manager")
    private String manager;
    @TableField(value = "d_state")
    private Integer state;
    @TableField(value = "d_remember_code")
    private String rememberCode;
    @TableField(value = "d_update_time",fill = FieldFill.INSERT_UPDATE)
    @Version
    private Date updateTime;
}
